<!DOCTYPE html>
<html>
<head>
    {include file="public/head"}
    <style>
        .cell-input{margin-left: 20px;}
    </style>
</head>
<body>
<div class="g-flexview">
    <header class="m-navbar">
        <a href="javascript:history.back();" class="navbar-item">
            <i class="back-ico"></i>
        </a>
        <div class="navbar-center"><span class="navbar-title">实名认证</span></div>
    </header>
    <div class="g-scrollview">
        <div class="m-celltitle">基本信息</div>
        <form action="/" method="post">
            <div class="m-cell">
                <div class="cell-item">
                    <div class="cell-left">呢称</div>
                    <div class="cell-right">{$info['nickname']}</div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">证件类型</div>
                    <div class="cell-right">身份证</div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">证件号码</div>
                    <div class="cell-right">
                        {if condition="$info['is_real'] == 0"}
                        <input type="text" class="cell-input" placeholder="请输入身份证号" name="id_card">
                        {else/} {$info['id_card']} {/if}
                    </div>
                </div>
            </div>
            <div class="m-celltitle">账户信息</div>
            <div class="m-cell">
                <div class="cell-item">
                    <div class="cell-left">支付宝账户</div>
                    <div class="cell-right">
                        {if condition="$info['is_real'] == 0"}
                        <input type="text" class="cell-input" placeholder="请输入支付宝账户" name="alipay">
                        {else/} {$info['alipay']} {/if}
                    </div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">微信号</div>
                    <div class="cell-right">
                        {if condition="$info['is_real'] == 0"}
                        <input type="text" class="cell-input" placeholder="请输入微信号" name="weixin">
                        {else/} {$info['weixin']} {/if}
                    </div>
                </div>
            </div>
            <div class="m-celltitle">银行卡信息</div>
            <div class="m-cell">
                <div class="cell-item">
                    <div class="cell-left">真实姓名</div>
                    <div class="cell-right">
                        {if condition="$info['is_real'] == 0"}
                        <input type="text" class="cell-input" placeholder="请输入真实姓名" name="name">
                        {else/} {$info['name']} {/if}
                    </div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">银行卡账号</div>
                    <div class="cell-right">
                        {if condition="$info['is_real'] == 0"}
                        <input type="text" class="cell-input" placeholder="请输入银行卡账号" name="bank_no">
                        {else/} {$info['bank_no']} {/if}
                    </div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">预留手机号</div>
                    <div class="cell-right">
                        {if condition="$info['is_real'] == 0"}
                        <input type="text" class="cell-input" placeholder="请输入预留手机号" name="keep_phone">
                        {else/} {$info['keep_phone']} {/if}
                    </div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">开户地区</div>
                    <div class="cell-right">
                        {if condition="$info['is_real'] == 0"}
                        <input type="text" class="cell-input" placeholder="请输入开户地区" name="open_area">
                        {else/} {$info['open_area']} {/if}
                    </div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">开户银行</div>
                    <div class="cell-right">
                        {if condition="$info['is_real'] == 0"}
                        <input type="text" class="cell-input" placeholder="请输入开户银行" name="open_bank">
                        {else/} {$info['open_bank']} {/if}
                    </div>
                </div>
                <div class="cell-item">
                    <div class="cell-left">联行名称</div>
                    <div class="cell-right">
                        {if condition="$info['is_real'] == 0"}
                        <input type="text" class="cell-input" placeholder="请输入联行名称" name="union_name">
                        {else/} {$info['union_name']} {/if}
                    </div>
                </div>
            </div>
        </form>
        {if condition="$info['is_real'] == 0"}
        <div class="m-button">
            <button type="button" class="btn-primary btn-block save-info">确定</button>
        </div>
        {/if}
    </div>
</div>
{include file="public/js"}
{if condition="$info['is_real'] == 0"}<script>dialog.notify('请完成实名制后才能进行后续操作！', 5000);</script>{/if}
<script>
    !function ($) {
        $('.save-info').click(function () {
            dialog.confirm('温馨提示','请检查填写的资料是否有误,后续将不可修改',function () {
                $.post('/index/user/real',$('form').serialize(),function (res) {
                    dialog.toast(res.msg,'none',1000,function () {
                        location.reload();
                    });
                });
            });
        });
    }(jQuery);
</script>
</body>
</html>